package so.sao.service.order;

import so.sao.domain.TbOrder;
import so.sao.domain.TbOrderDetails;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author  gxy on 2017/7/10.
 */
public interface OrderService {
    /**
     * 分页获取所有订单.
     * @return List<TbOrder>
     */
    List<TbOrder> getOrders(int pageNum);

    /**
     * 根据状态值分页获取所有订单.
     * @param status
     * @return List<TbOrder>
     */
    List<TbOrder> getOrderListByStatus(String status, int pageNum);

    /**
     * 根据订单Id获取订单详情.
     * @param orderId
     * @return List<TbOrderDetails>
     */
    List<TbOrderDetails> getOrderDetailByOId(String orderId);

    /**
     * 更改某个订单的状态值.
     * @param status
     * @param orderId
     * @return int 1成功0失败
     */
    int updateOrderStatus(String status, String orderId) throws Exception;

    /**
     * POI导出Excel.
     * @param request
     * @param response
     * @param status
     */
    void exportExcel(HttpServletRequest request, HttpServletResponse response, String status);


}
